package com.woniu;

public class Test {
    public static void main(String[] args) {
        Person person =(Person) new BeanFactory().getByName("chinese");
        person.eat();
        BeanFactory beanFactory = new BeanFactory();
        System.out.println(beanFactory.getByName("chinese"));
        System.out.println(beanFactory.getByName("chinese"));
        System.out.println(beanFactory.getByName("chinese"));
        System.out.println(beanFactory.getByName("chinese"));
        System.out.println(beanFactory.getByName("chinese"));
    }
}
